package com.res.share.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface IndexService{
    /**
     * 获取首页信息
     * @param request
     * @param response
     * @return
     */
    Map<String, Object> findWebIndexData(HttpServletRequest request,HttpServletResponse response);

    /**
     * 热门信息
     * @param userId
     * @param type
     * @param pageNum
     * @return
     */
    Map<String, Object> findHotArticleList(Integer userId, Integer type, Integer pageNum);

    /**
     * 资源数据
     * @param userId
     * @param i
     * @param pidName
     * @param name
     * @param pageNum
     * @return
     */
    Map<String, Object> findArticleByCateId(Integer userId, int i, String pidName, String name, Integer pageNum);

    /**
     * 搜搜
     *
     * @param pageNum
     * @param userId
     * @param keywords
     * @return
     */
    Map<String, Object> searchArticleList(Integer pageNum, Integer userId, String keywords);

    /**
     * 查询文章详情
     * @param userId
     * @param articleId
     * @return
     */
    Map<String, Object> findArtDetail(Integer userId, Integer articleId);

    /**
     * 统计浏览量
     * @param articleId
     */
    void updateArticleLookSee(Integer articleId);

    /**
     * 保存历史记录
     * @param articleId
     * @param finalUserId
     */
    void saveArticleHistory(Integer articleId, Integer finalUserId);

    /**
     * 标签文章列表
     * @param pageNum
     * @param userId
     * @param tagpinyin
     * @return
     */
    Map<String, Object> findTagArticleList(Integer pageNum, Integer userId, String tagpinyin);

    /**
     * 用户资源
     * @param userId
     * @param beLongUserId
     * @param pageNum
     * @return
     */
    Map<String, Object> findUserSHopResList(Integer userId, Integer beLongUserId, Integer pageNum);
}
